package visual;

/*
 * This class creates a colorchemes.py file
 */

import java.io.*;

public class ColorScheme {

	public static void main(String[] args) throws Exception {
		PrintWriter out = new PrintWriter(new FileWriter(new File("D:/CODE/WHEREABOUTS/Erlang/heatmap-1.0/heatmap/colorschemes.py")));
		
		int r = 255;
		int g = 255;
		int b = 255;
		
		out.println("\"\"\" color scheme source data \"\"\"");
		out.println("schemes = {'fire': [("+r+", "+g+", "+b+"),");
		for(int i=1; i<255;i++) {
			
			
			
			if(i>35 && i<50) {
				b = b - 2;	
			}
			
			else if(i>=50 && i<100) {
				b = b - 3;
			}
			
			else if(i>=100 && i<130) {
				r = r - 1;
				g = g - 2;
			}
			else if(i>=140 && i<220) {
				g = g - 1;
			}
			else if(i>=220 && i<250) {
				r = r -2;
				g = g -1;
				b = b -1;
			}
			
			
			
			
			
			
			out.println("("+r+", "+g+", "+b+"),");
		}
		out.println("("+r+", "+g+", "+b+")]}");
		out.close();
		System.out.println("Done!");
		
	}
		
}
